package org.shs.common.config;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ExceptionHandler;
import org.apache.struts.config.ExceptionConfig;


/**
 * This class extends the base exception handler provided in the 
 * Struts framework. This class allows us to gain finer control 
 * over the handling of any exception state.
 * <br/>
 * <br/><b>Created:</b>&nbsp;&nbsp; 12-Nov-2008 00:18:17
 *
 * @author anirvan
 *
 */
public class AppExceptionHandler extends ExceptionHandler
{
   /* (non-Javadoc)
    * @see org.apache.struts.action.ExceptionHandler#execute(
    *                               java.lang.Exception, 
    *                               org.apache.struts.config.ExceptionConfig, 
    *                               org.apache.struts.action.ActionMapping, 
    *                               org.apache.struts.action.ActionForm, 
    *                               javax.servlet.http.HttpServletRequest, 
    *                               javax.servlet.http.HttpServletResponse)
    */
   public ActionForward execute( Exception ex, 
                                 ExceptionConfig exConfig,
                                 ActionMapping mapping,
                                 ActionForm formInstance,
                                 HttpServletRequest request,
                                 HttpServletResponse response
   ) throws ServletException
   {
      
      return super.execute(ex, exConfig, mapping, 
               formInstance, request, response);
   }
}
